<form action="{:sysuri()}" data-table-id="FormTable" class="layui-form layui-card" data-auto="true" method="post">
    <div class="layui-card-body padding-left-40">

        <div class="layui-form-item label-required-prev">
            <span class="help-label"><b>绑定上级分类</b>Category Parent</span>
            <select class='layui-select' name='pid' lay-search>
                {foreach $cates as $cate}
                {eq name='cate.id' value='$vo.pid|default=0'}
                <option selected value='{$cate.id}'>{$cate.spl|raw}{$cate.name}</option>
                {else}
                <option value='{$cate.id}'>{$cate.spl|raw}{$cate.name}</option>
                {/eq}{/foreach}
            </select>
            <span class="help-block"><b>必选，</b>请选择上级分类或顶级分类（目前最多支持{$cateLevel|default=0}级分类）</span>
        </div>

        <label class="layui-form-item relative block">
            <span class="help-label"><b>商品分类名称</b>Category Name</span>
            <input class="layui-input" name="name" placeholder="请输入分类名称" required value='{$vo.name|default=""}'>
            <span class="help-block"><b>必填，</b>请填写商品分类名称，建议字符不要太长，一般 4-6 个汉字</span>
        </label>

        <div class="layui-form-item relative block">
            <span class="help-label"><b>商品分类图标</b>Category Cover</span>
            <label class="relative block">
                <input class="layui-input think-bg-gray" readonly name="cover" placeholder="请上传商品分类图标" value='{$vo.cover|default=""}'>
                <a class="input-right-icon layui-icon layui-icon-upload" data-field="cover" data-file data-type="png,jpg,gif"></a>
            </label>
            <span class="help-block"><b>可选，</b>请上传商品分类图标，需要是 http 可访问的图片资源链接</span>
        </div>

        <label class="layui-form-item relative block">
            <span class="color-green font-w7">商品分类描述</span>
            <span class="color-desc margin-left-5">Category Remark</span>
            <textarea class="layui-textarea" name="remark" placeholder="请输入分类描述">{$vo.remark|default=''}</textarea>
        </label>
    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input name='id' type='hidden' value='{$vo.id}'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" data-close type='button' data-confirm="确定要取消编辑吗？">取消编辑</button>
    </div>

</form>